/*
 * Copyright (C) 2004, Velocityme Partnership
 * TimeReportActionForm.java
 *
 * Created on 12 November 2004, 10:14
 */

package com.velocityme.www.actionforms;

import com.velocityme.interfaces.ContactablePK;
import java.util.ArrayList;
import java.util.Collection;
import org.apache.struts.action.*;

/**
 *
 * @author  Robert
 */
public class TimeReportActionForm extends ActionForm {
    
    private Integer m_nodeId;
    private Integer[] m_contactableIds;
    private Boolean m_isRecursive;
    private Boolean m_includeTasks;
    private Boolean m_includeTypes;
    private Boolean m_includeStates;
    private Boolean m_includeMonths;
    private Boolean m_includeWeeks;
    private Boolean m_includeDays;
    private Boolean m_includeEntries;
    private int m_startYear;
    private int m_startMonth;
    private int m_startDay;
    private int m_stopYear;
    private int m_stopMonth;
    private int m_stopDay;
    
    /** Creates a new instance of TimeReportActionForm */
    public TimeReportActionForm() {
    }
    
    public void reset(ActionMapping mapping, javax.servlet.http.HttpServletRequest request) {
        m_contactableIds = new Integer[0];
        m_isRecursive = new Boolean(true);
        m_includeTasks = new Boolean(false);
        m_includeTypes = new Boolean(false);
        m_includeStates = new Boolean(false);
        m_includeMonths = new Boolean(false);
        m_includeWeeks = new Boolean(false);
        m_includeDays = new Boolean(false);
        m_includeEntries = new Boolean(false);
    }
    
    public Integer getNodeId() {
        return m_nodeId;
    }
    
    public void setNodeId(Integer nodeId) {
        m_nodeId = nodeId;
    }
    
    public Integer[] getContactableIds() {
        return m_contactableIds;
    }
    
    public void setContactableIds(Integer[] contactableIds) {
        m_contactableIds = contactableIds;
    }
    
    public Boolean getIsRecursive() { return m_isRecursive; }
    public void setIsRecursive(Boolean isRecursive) { m_isRecursive = isRecursive; }
    public Boolean getIncludeTasks() { return m_includeTasks; }
    public void setIncludeTasks(Boolean includeTasks) { m_includeTasks = includeTasks; }
    public Boolean getIncludeTypes() { return m_includeTypes; }
    public void setIncludeTypes(Boolean includeTypes) { m_includeTypes = includeTypes; }
    public Boolean getIncludeStates() { return m_includeStates; }
    public void setIncludeStates(Boolean includeStates) { m_includeStates = includeStates; }
    public Boolean getIncludeMonths() { return m_includeMonths; }
    public void setIncludeMonths(Boolean includeMonths) { m_includeMonths = includeMonths; }
    public Boolean getIncludeWeeks() { return m_includeWeeks; }
    public void setIncludeWeeks(Boolean includeWeeks) { m_includeWeeks = includeWeeks; }
    public Boolean getIncludeDays() { return m_includeDays; }
    public void setIncludeDays(Boolean includeDays) { m_includeDays = includeDays; }
    public Boolean getIncludeEntries() { return m_includeEntries; }
    public void setIncludeEntries(Boolean includeEntries) { m_includeEntries = includeEntries; }
    public int getStartYear() { return m_startYear; }
    public void setStartYear(int year) { m_startYear = year; }
    public int getStartMonth() { return m_startMonth; }
    public void setStartMonth(int month) { m_startMonth = month; }
    public int getStartDay() { return m_startDay; }
    public void setStartDay(int day) { m_startDay = day; }
    public int getStopYear() { return m_stopYear; }
    public void setStopYear(int year) { m_stopYear = year; }
    public int getStopMonth() { return m_stopMonth; }
    public void setStopMonth(int month) { m_stopMonth = month; }
    public int getStopDay() { return m_stopDay; }
    public void setStopDay(int day) { m_stopDay = day; }    
    
    public ContactablePK[] getContactablePKs() {
        ContactablePK[] contactablePKs = new ContactablePK[m_contactableIds.length];
        for (int i = 0; i < m_contactableIds.length; i++) {
            contactablePKs[i] = new ContactablePK(m_contactableIds[i]);
        }
        return contactablePKs;
    }
    
}
